<?

$fs_ass_tra_maintenance_entry = new Fieldset (array (
	db_conn=>$_GLOBAL_DBH,
	relation=>"ass_tra_maintenance_entry",
	title=>"Asset Maintenance ",
	fieldset=>array (
		array (name=>"id",label=>"ID",type=>"numeric",
				value=>$_REQUEST["maintenance_id"],
				input=>"hidden",primary_key=>true),
		array (name=>"employee_id",label=>"Employee ID",type=>"numeric",
				relation=>array(foreign=>"ass_tra_employee",key=>"id",
				field=>"name"),
				input=>"select",
				options=>"_app_select_query",
				options_params=>"SELECT id,name FROM ass_tra_employee",
				columns=>array (key=>"id",value=>"name"),
		),
		array (name=>"asset_id",label=>"Asset ID",type=>"numeric",
				relation=>array(foreign=>"ass_tra_assets",key=>"id",
				field=>"name"),
				input=>"select",
				options=>"_app_select_query",
				options_params=>"SELECT id,name FROM ass_tra_assets",
				columns=>array (key=>"id",value=>"name"),
		),
		array (name=>"maintenance_date",label=>"Maintenance Date",type=>"any",
				input=>"date",value=>_app_date("maintenance_date")),
		array (name=>"description",label=>"Description",type=>"any",
				input=>"date"),
		array (name=>"cost",label=>"Cost",type=>"decimal",
				input=>"field"),
	),
));

$fs_ass_tra_maintenance_entry->parse ();

?>
